package com.ql.gamelogm.service;

import com.ql.gamelogm.entities.Log;
import com.ql.gamelogm.entities.SearchHistory;
import com.ql.gamelogm.entities.WarnLog;
import org.springframework.data.domain.Page;

import java.text.ParseException;
import java.util.List;

public interface LogService {
    //插入日志操作数据
    void savelog(Log log);

    //取日志操作数据
    List<Log> findAllLogs();

    //插入搜索历史数据
    void SaveSearchHistory(SearchHistory searchHistory);

    //取搜索历史数据
    List<SearchHistory> findAllSearchHistory();

    /*取告警日志数据*/
    List<WarnLog> findAllWarnLog();
    public List<WarnLog> findWarnLogById(int id);
    boolean saveWarnLog(WarnLog warnLog);
    boolean updateWaitWarnLogState(int id, WarnLog warnLog);

    boolean updateAcepWarnLogState(int id, WarnLog warnLog);
    boolean saveRecentTime( String date);
    //日志分页操作
    Page<Log> getLogList(int pageNum, int pageSize, String operator) throws ParseException;

    Page<WarnLog> getWaitWarnLogList(int pageNum, int pageSize) throws ParseException;

    Page<WarnLog> getWarnLogList(int pageNum, int pageSize) throws ParseException;

    Page<WarnLog> getSolvedWarnLogList(int pageNum, int pageSize) throws ParseException;

    Page<SearchHistory> getAllSearchHisroty(int pageNum, int pageSize, String operator) throws ParseException;

}
